package com.example.business_oa.service;

import com.example.comment_oa.dubbo.QiDongFuLiLiuChengDubbo;
import com.example.comment_oa.dubbo.SalaryZhuBiaoDubbo;
import com.example.comment_oa.pojos.xinzi.ShsalaryZhubiao;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SalaryZhuBiaoService {
    @DubboReference(version = "1.0.0")
    SalaryZhuBiaoDubbo salaryZhuBiaoDubbo;

    @GlobalTransactional(timeoutMills = 300000)
    public List<ShsalaryZhubiao> selectZhuId(String srId){
        List<ShsalaryZhubiao> shsalaryZhubiaos = salaryZhuBiaoDubbo.sleectZhuJian(srId);
        return shsalaryZhubiaos;
    }

    @GlobalTransactional(timeoutMills = 300000)
    public int insertAll(ShsalaryZhubiao shsalaryZhubiao){
        int i = salaryZhuBiaoDubbo.insertAll(shsalaryZhubiao);
        return i;
    }

}
